/*
 *  Librarie de tipuri de date abstracte (TDA)
 
    Copyright (C) 2007  Catedra de Structuri de Date

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

/**
@file btnode.h
@author -
@brief This header file contains the structures and functions needed to work with
a binary tree node.
It contains functions for creating a binary tree node, getting data etc.
TODO: + alte lucruri care urmeaza a fi decise
*/

#ifndef BTNODE_H_
#define BTNODE_H_

typedef enum _Direction
{
	LEFT=0,
	RIGHT=1
} Direction;

struct btnode_adt;

typedef struct btnode_adt *BTNode;

BTNode BTN_New(const void* data);

void* BTN_GetData(BTNode node);

void BTN_SetData(BTNode node, const void* data);

BTNode BTN_GetParent(BTNode node);

BTNode BTN_GetSon(BTNode node, Direction dir);

void BTN_SetSon(BTNode node, Direction dir, BTNode newSon);

void* BTN_Delete(BTNode node);

#endif /*BTNODE_H_*/
